<?php


namespace app\services;


use app\tools\T;

class SendMsgServices extends Services {
    protected $users_id = '523';
    protected $account = '7878';
    protected $password = '123456';
    protected $content;
    protected $sendTime;
    protected $extno;
    protected $action = 'send';
    protected $mobile;

    /**
     * @return mixed
     */
    public function getContent() {
        return $this->content;
    }

    /**
     * @param mixed $content
     */
    public function setContent($content): void {
        $this->content = $content;
    }

    /**
     * @return mixed
     */
    public function getSendTime() {
        return $this->sendTime;
    }

    /**
     * @param mixed $sendTime
     */
    public function setSendTime($sendTime): void {
        $this->sendTime = $sendTime;
    }

    /**
     * @return mixed
     */
    public function getMobile() {
        return $this->mobile;
    }

    /**
     * @param mixed $mobile
     */
    public function setMobile($mobile): void {
        $this->mobile = $mobile;
    }

    public function sendMsg() {
        $requestStr = "http://175.6.2.121:8080/sms.aspx";
        return $Result = T::https_post_plus($requestStr, http_build_query([
            'action' => $this->action,
            'userid' => $this->users_id,
            'account' => $this->account,
            'password' => $this->password,
            'mobile' => $this->mobile,
            'content' => $this->content,
            'sendTime' => '',
            'extno' => '',
        ]));
    }
}